package cn.trigram.mgb.mixed_simple_dynamic;

import cn.trigram.mgb.ext.AbstractTableGenerateCustomize.DefaultTableGenerateCustomize;
import org.apache.commons.lang3.StringUtils;
import org.mybatis.generator.internal.util.JavaBeansUtil;

public class MixedMybatis3DynamicSqlDefaultTableGenerateCustomize extends DefaultTableGenerateCustomize {

  @Override
  public String getMapperName() {

    final String entityClassName = JavaBeansUtil.getCamelCaseString(StringUtils.removeEndIgnoreCase(
        StringUtils.removeStartIgnoreCase(tableConfiguration.getTableName(), this.getTablePrefix()),
        this.getTableSuffix()
    ), true);
    return entityClassName + "DynamicSql";
  }

}
